#!/bin/sh

set -e

. /usr/share/debconf/confmodule
#export dbc_dbname="newdbname"
if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then
        . /usr/share/dbconfig-common/dpkg/config.mysql
        if ! dbc_go limba $@ ; then
            echo 'Automatic configuration using dbconfig-common failed!'
        fi
fi

db_version 2.0

db_input high limba/reconfigure-webserver || true

if [ ! -f /etc/limba/htpasswd.setup ]; then
	db_input low limba/setup-username || true
	db_input low limba/setup-password || true
fi

db_go || true

